<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="http://localhost/YouHuoShop/Static/Index/style/bootstrap-3.3.5-dist/css/bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css" href="http://localhost/YouHuoShop/Static/Index/style/topNav.css"/>
	<link rel="stylesheet" type="text/css" href="http://localhost/YouHuoShop/Static/Index/style/content.css"/>
	<link rel="stylesheet" type="text/css" href="http://localhost/YouHuoShop/Static/Index/style/foot.css"/>
	<script src="http://localhost/YouHuoShop/Static/Index/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var ajaxUrl="<?php echo U('ajaxInventory',array('gid'=>$_GET['gid']));?>"
		var cartUrl="<?php echo U('ajaxCart');?>"
	</script>
	<script src="http://localhost/YouHuoShop/Static/Index/js/content.js" type="text/javascript" charset="utf-8"></script>
	<script src="http://localhost/YouHuoShop/Static/Index/js/common.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>

<link rel="stylesheet" type="text/css" href="http://localhost/YouHuoShop/Static/Index/style/topNav.css"/>

<!---------------顶部logo区域开始--------------->
<div id="topLogo">
</div>
<!---------------顶部logo结束------------------->
<a href="#memBox" id="toTop"><span class="glyphicon glyphicon-menu-up"></span></a>

<!---------------顶部会员消息区域开始------------>
<div id="memBox">
	<div id="mem">
		<div class="left">
			<a href="<?php echo U('Index/index');?>"><p>YOHO!有货</p></a>
		</div>
		<div class="right">
			<ul>
				<p>
					    <?php if(isset($hd['session']['uid'])&&isset($hd['session']['uname'])){ ?>
						<a href="<?php echo U('User/index',array('uid'=>$_SESSION['uid']));?>">Hi~<?php echo $hd['session']['uname'];?></a>
						<a href="<?php echo U('Member/out');?>">退出</a>
					<?php }else{ ?>
						<a href="<?php echo U('Member/login');?>">[请登录]</a>
						<a href="<?php echo U('Member/register');?>">[免费注册] </a>|
					<?php } ?>
				</p>
				<li><a href="">MY有货</a>|</li>
				<li><a href="">我的订单</a>|</li>
				<li><a href="">我的收藏</a>|</li>
				<li><a href="">消息</a>|</li>
				<li class="mob">
					<a href="">手机版</a>
					<div class="code">
						<div class="codeImg"></div>
						<h3 class="codeWords">扫描二维码</h3>
						<h3 class="codeWords">下载有货手机客户端</h3>
						<a href="">更多客户端下载</a>
					</div>
				</li>
			</ul>
		</div>
	</div>
</div>
<!---------------顶部会员消息区域结束------------>


<!---------------顶部导航搜索区域开始 ----------->

<div id="navSearchBox">
	<!--导航、二级菜单开始-->
	<div class="navSearch">
		<ul class="navCate">
			<!--<li class="checked">
				<p><a class="titleC" href="">男生</a></p>
				<p><a class="titleE" href="">BOYS</a></p>
			</li>
			<li>
				<p><a class="titleC" href="">女生</a></p>
				<p><a class="titleE" href="">GIRLS</a></p>
			</li>
			<li>
				<p><a class="titleC" href="">创意生活</a></p>
				<p><a class="titleE" href="">LIFE STYLE</a></p>
			</li>-->
		</ul>
	</div>	
	<div class="navBg">
		<div class="nav show">
			<ul class="navCate">
				<li class="fst"><a class="Cate" href="">新品到着</a></li>
				<li><a class="Cate" href="">品牌一览</a></li>
				<?php foreach ($navCate as $tk=>$t){?>
					<li>
						<a class="Cate" href="<?php echo U('list/index',array('cid'=>$tk));?>"><?php echo $t['cname'];?></a>
						<div class="cateBox">
							<div class="cateAll">
								<div class="sonCate ">
									<?php $i=0; ?>
									<?php foreach ($t['son'] as $ck=>$c){?>
										<p class="cateTitle"><a href="<?php echo U('list/index',array('cid'=>$c['cid']));?>"><?php echo $c['cname'];?></a></p>
										<?php $j=0;?>
										<?php foreach ($c['sec'] as $sk=>$s){?>
											<!--标签加class="hot"变红-->
											<p><a     <?php if($sk%3==0){ ?>class="hot" <?php } ?>href="<?php echo U('list/index',array('cid'=>$s['cid']));?>"><?php echo $s['cname'];?></a></p>
											<?php $i++; ?>
										    <?php if($i%7==0){ ?>
											</div>
											<div class="sonCate noF">
										<?php } ?>
										<?php
											$j++;
											if($j>3){ break; }
										?>
										<?php }?>
									<?php }?>
								</div>
								
								<div class="cateImg">
									<img src="http://localhost/YouHuoShop/Static/Index/images/cate.jpg" alt="" />
									<a href="">IN季新品全面开售</a>
								</div>
							</div>
						</div>
					</li>
				<?php }?>
			</ul>
		</div>
	</div>
	<!--导航、二级菜单结束-->
	
	<!--图片logo-->
	<a class="logo" href="http://localhost/YouHuoShop"><img src="http://localhost/YouHuoShop/Static/Index/images/logo_e.png" alt="" /></a>
	<!--搜索区域-->
	<div class="search">
		<form action="" method="post">
			<input class="words" name="words" type="text" />
			<input type="submit" class="sub" value="" />
		</form>
		<!--购物车-->
		<div class="car">
			<a href="" class=""><img src="http://localhost/YouHuoShop/Static/Index/images/car.png"/></a>
			<a href="" class="carBg">    <?php if(isset($_SESSION['cart'])){ ?><?php echo $_SESSION['cart']['total_rows'];?><?php }else{ ?>0<?php } ?></a>
		</div>
		<div class="shopping">
			<a href="javascript:;" class="close"><span class=" glyphicon glyphicon-remove"></span></a>
			    <?php if(!isset($_SESSION['cart'])){ ?>
				<ul class="emptyCar">
					<img src="http://localhost/YouHuoShop/Static/Index/images/car/empty_car.png" alt="" />
					<h3>您的购物车暂无商品</h3>
				</ul>
			<?php } ?>
			<!--购物车内的商品是li-->
				<ul>
			<?php foreach ($_SESSION['cart']['goods'] as $k=>$g){?>
					<li>
						<img src="http://localhost/YouHuoShop/<?php echo $g['thumb'];?>" alt="" />
						<a class="goodsName" href=""><?php echo mb_substr($g['name'],0,22,'utf-8');?></a>
						<p>
							<?php foreach ($g['options'] as $ok=>$o){?>
								<span class="size"><?php echo $ok;?>：<?php echo $o;?></span>
							<?php }?>
						</p>
						<span class="price">￥<?php echo $g['price'];?> * <?php echo $g['num'];?></span>
						<a href="" class="del">删除</a>
					</li>
			<?php }?>
					<a href="<?php echo U('confirmOrder/index');?>" class="toShopping">去购物车结算</a>
				</ul>
		</div>
	</div>
</div>
<!---------------顶部导航搜索区域结束 ----------->


<!---------------内容页头部开始 ----------->
<div id="conTopBox">
	<div id="conTop">
		<div class="logo">
			<img src="http://localhost/YouHuoShop/<?php echo $goods['logo'];?>" alt="" />
		</div>
		<div class="mem">
			<a href=""><img src="http://localhost/YouHuoShop/Static/Index/images/home.png"/></a>
			<a href=""><img src="http://localhost/YouHuoShop/Static/Index/images/love.png"/></a>
		</div>
	</div>
</div>
<!---------------内容页头部结束 ----------->


<!---------------面包屑开始 ----------->
<div id="bread">
	 <a href="http://localhost/YouHuoShop">BOYS首页</a>
	         <?php
        //初始化
        $hd['list']['b'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($bread)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($bread as $b) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][b]['index']++;
                //第1个值
                $hd['list'][b]['first']=($listId == 0);
                //最后一个值
                $hd['list'][b]['last']= (count($bread)-1 <= $listId);
                //总数
                $hd['list'][b]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
		    <?php if($hd['list']['b']['last']){ ?>
			<span>></span>
			<span class="last"><?php echo $b;?></span>
		<?php }else{ ?>	
			<span>></span>
			<a href="<?php echo U('List/index',array('cid'=>$b['cid']));?>"><?php echo $b['cname'];?></a>
		<?php } ?>
	<?php }}?>
</div>
<!---------------面包屑结束 ----------->


<!---------------商品信息区域开始 ----------->
<div id="goodsInfo">
	<!--每种颜色商品的套图-->
	<div class="goodsImg">
		<div class="bigImg">
			        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($goods['mimg'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($goods['mimg'] as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($goods['mimg'])-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
				<img      <?php if($hd['list']['n']['first']){ ?>class="fst" <?php } ?> src="http://localhost/YouHuoShop/<?php echo $v;?>" alt="" />
			<?php }}?>
		</div>
		<div class="thumb">
			        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($goods['simg'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($goods['simg'] as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($goods['simg'])-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
				<a class="checked" href="javascript:;"><img src="http://localhost/YouHuoShop/<?php echo $v;?>" alt="" /></a>
			<?php }}?>
		</div>
	</div>
	<!--每种颜色商品的套图结束-->
	
	<div class="right">
		<!--商品名称-->
		<div class="title">
			<h3 class="goodsName"><?php echo $goods['gname'];?></h3>
			<p><a href="<?php echo U('Brand/index',array('bid'=>$goods['bid']));?>"><?php echo $goods['bname'];?></a></p>
		</div>
		<!--商品价格-->
		<div class="price">
			<span >市场价：</span>
			<span class="marketPrice">￥<b><?php echo $goods['market_price'];?></b></span>
			<p></p>
			<span >商城价：</span>
			<span class="shopPrice">￥<b><?php echo $goods['shop_price'];?></b></span>
		</div>
		<!--价格活动-->
		<div class="activity">
			<div class="activityImg">
				<a href=""><img src="http://localhost/YouHuoShop/Static/Index/images/goods/price.jpg" alt="" /></a>
			</div>
			<div class="activityCon">
				<ul>
					<li><span>满减</span>【优品推介】满￥599减￥150</li>
					<li><span>满减</span>【优品推介】满￥399减￥80</li>
					<li><span>加价购</span>【全场99元加价购】</li>
					<li><span>加价购</span>【全场49元加价购】</li>
					<li><span>加价购</span>【全场19元加价购】</li>
				</ul>
			</div>
		</div>
		<!--价格活动结束-->
		
		<!--商品购买区域-->
		<div class="goodsBuy">
			<ul>
				<!--这里留着之后做，选择颜色商品展示图更换对应的颜色
				<!--<li class="goodsColor">
					<span>选颜色：</span>
					<a class="checked" href="javascript:;"><img src="http://localhost/YouHuoShop/Static/Index/images/goods/buy/color.jpg"/></a>
					<a href="javascript:;"><img src="http://localhost/YouHuoShop/Static/Index/images/goods/buy/color.jpg"/></a>
					<a href="javascript:;"><img src="http://localhost/YouHuoShop/Static/Index/images/goods/buy/color.jpg"/></a>
					<a href="javascript:;">红</a>
					<a href="javascript:;">黄</a>
					<a href="javascript:;">蓝</a>
				</li>-->
				<?php foreach ($attr as $k=>$v){?>
					<li class="spec">
						<span>选<?php echo $k;?>：</span>
						<?php foreach ($v as $ak=>$a){?>
							<a href="javascript:;" gaid=<?php echo $a['gaid'];?> subjoin=<?php echo $a['subjoin'];?>><?php echo $a['attr_value'];?></a>
						<?php }?>
					</li>
				<?php }?>
				<li class="quantity">
					<span>选数量：</span>
					<span class="num">1</span>
					<span class="change">
						<a class="up" href="javascript:;">+</a>
						<a class="down" href="javascript:;">-</a>
					</span>
					<span class="inventory">库存（<i><?php echo $goods['store'];?></i>）件</span>
				</li>
			</ul>
			<form action="" method="post" id="shopCar">
				<input type="hidden" name="id" value="<?php echo $goods['gid'];?>" />				<!--商品id-->
				<input type="hidden" name="name" value="<?php echo $goods['gname'];?>" />			<!--商品名称-->
				<input type="hidden" name="num" class="numg" value="1" />			<!--商品数量-->
				<input type="hidden" name="price" class="priceg" value="<?php echo $goods['shop_price'];?>" />	<!--商品价格-->
				<?php foreach ($attr as $k=>$v){?>						
					<input type="hidden" class="carSpec" name="options[<?php echo $k;?>]" value="" />			<!--商品规格-->
				<?php }?>
				<input type="hidden" name='glid' class="glid" value="" />
				<input type="hidden" name="thumb" value="<?php echo $goods['list_img'];?>" />
				<input type="submit" name="" id="car" value="添加到购物车" />
				<a href="" ><i class="glyphicon glyphicon-heart"></i> 收藏商品</a>
			</form>
			<div class="isRes">
				<a href="<?php echo U('Car/index');?>" class="isCar">去购物车结算</a>
				<a href="javascript:;" class="goON">继续购物</a>
			</div>
		</div>
	</div>
	
</div>

<!---------------商品信息区域结束 ----------->



<!---------------商品属性区域开始 ----------->
<div id="goodsAttr">
	
	<?php echo $goods['info'];?>
	
	<div class="attr user">
		<ul class="title ">
			<li btn="myAsk" class="my checked">顾客咨询 (<span>0</span>)</li>
			<li class="mid">|</li>
			<li btn="mySay" class="my ">购买评价 (<span>0</span>)</li>
		</ul>
		
		<div class="msg">
			<!--咨询内容-->
			<div class="comment askBox">
				<div class="msgTitle myAsk">
					<p>购买咨询(<span>0</span>)</p>
				</div>
				<div class="userCom">
					<img src="http://localhost/YouHuoShop/Static/Index/images/content/boy.jpg" alt="" />
					<p class="ask">身高162~裤子是29的~s码可以穿吗？！</p>
					<p class="time">2015-08-30 23:39:22</p>
					<p class="answer">您好，按照您提供的信息，建议参考S号，购买裤子是参考具体腰围厘米数的，不同品牌款式的尺码是不一样的，您也可以测量下自己的腰围然后参考网页尺码选择，感谢您对yoho!有货的关注。</p>
				</div>
				<div class="userCom">
					<img src="http://localhost/YouHuoShop/Static/Index/images/content/boy.jpg" alt="" />
					<p class="ask">身高162~裤子是29的~s码可以穿吗？！</p>
					<p class="time">2015-08-30 23:39:22</p>
					<p class="answer">您好，按照您提供的信息，建议参考S号，购买裤子是参考具体腰围厘米数的，不同品牌款式的尺码是不一样的，您也可以测量下自己的腰围然后参考网页尺码选择，感谢您对yoho!有货的关注。</p>
				</div>
				<a href="javascript:;" class="btn myAsk">我要咨询</a>
			</div>
			<!--评价内容-->
			<div class="comment sayBox">
				<div class="msgTitle mySay">
					<p>购买评价(<span>0</span>)</p>
				</div>
				<div class="userCom">
					<img src="http://localhost/YouHuoShop/Static/Index/images/content/boy.jpg" alt="" />
					<p class="ask">FranKa购买了红色/XL</p>
					<p class="time">2015-08-30 23:39:22</p>
					<p class="answer">您好，按照您提供的信息，建议参考S号，购买裤子是参考具体腰围厘米数的，不同品牌款式的尺码是不一样的，您也可以测量下自己的腰围然后参考网页尺码选择，感谢您对yoho!有货的关注。</p>
				</div>
				<div class="userCom">
					<img src="http://localhost/YouHuoShop/Static/Index/images/content/boy.jpg" alt="" />
					<p class="ask">身高162~裤子是29的~s码可以穿吗？！</p>
					<p class="time">2015-08-30 23:39:22</p>
					<p class="answer">您好，按照您提供的信息，建议参考S号，购买裤子是参考具体腰围厘米数的，不同品牌款式的尺码是不一样的，您也可以测量下自己的腰围然后参考网页尺码选择，感谢您对yoho!有货的关注。</p>
				</div>
				<a href="javascript:;" class="btn myAsk">我要评论</a>
			</div>
			
			<div class="newMsg myAsk">
				<form action="" method="post">
					<textarea name="comment" rows="" class="comText" cols=""></textarea>
					<input type="text" name="code" class="code" />
					<img src="" alt="验证码" class="code" />
					<input type="submit" value="提交查询" class="btn" />
				</form>
			</div>
			<div class="newMsg mySay">
				<form action="" method="post">
					<textarea onresize="" name="comment" rows="" class="comText" cols=""></textarea>
					<input type="text" name="code" class="code" />
					<img src="" alt="验证码" class="code" />
					<input type="submit" value="发表评论" class="btn" />
				</form>
				
			</div>
		</div>
	</div>
</div>

<!---------------商品属性区域结束 ----------->


<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>

<link rel="stylesheet" type="text/css" href="http://localhost/YouHuoShop/Static/Index/style/foot.css"/>
	
<!---------------底部区域开始------------>	
<div id="footBox">
	<div class="foot">
		<div class="top">
			<p class="bz">	
				<span class="red">100%</span>
				<span class="white">品牌授权正品</span>
			</p>
			<p class="sh">
				<span class="red">7天</span>
				<span class="white">无理由退换货</span>
			</p>
			<p class="dh">
				<span class="white">客服电话</span>
				<span class="red">400-889-9646</span>
				<span class="white">09:00-22:30(周一至周日)</span>
			</p>
		</div>
		<div class="list">
			<ul>
				<li ><a class="title" href="">新手指南</a></li>
				<li><a href="">新用户注册</a></li>
				<li><a href="">会员登录</a></li>
				<li><a href="">订购流程</a></li>
				<li><a href="">交易须知</a></li>
			</ul>
			<ul>
				<li ><a class="title" href="">付款方式</a></li>
				<li><a href="">支付方式</a></li>
				<li><a href="">常见支付问题</a></li>
				<li><a href="">如何办理退款</a></li>
				<li><a href="">发票制度说明</a></li>
			</ul>
			<ul>
				<li ><a class="title" href="">配送方式</a></li>
				<li><a href="">配送时间及范围</a></li>
				<li><a href="">订单的拆分</a></li>
				<li><a href="">商品验收与签收</a></li>
			</ul>
			<ul>
				<li ><a class="title" href="">售后服务</a></li>
				<li><a href="">如何办理退换货</a></li>
				<li><a href="">退换货政策</a></li>
				<li><a href="">在线客服</a></li>
			</ul>
			
			<ul>
				<li ><a class="title" href="">帮助中心</a></li>
				<li><a href="">找回密码</a></li>
				<li><a href="">常见问题</a></li>
				<li><a href="">谨防诈骗</a></li>
			</ul>
			<ul>
				<li ><a class="title" href="">优惠政策</a></li>
				<li><a href="">VIP会员制度说明</a></li>
				<li><a href="">YOHO币</a></li>
				<li><a href="">优惠券</a></li>
				<li><a href="">兑换礼品卡</a></li>
			</ul>
		</div>
		
		<div class="bottom">
			<div class="left">
				<img src="http://localhost/YouHuoShop/Static/Index/images/credit-flag3.png" alt="" />
				<img src="http://localhost/YouHuoShop/Static/Index/images/isc2.png" alt="" />
			</div>
			<div class="right">
				<p class="con">
					<a href="">返回首页</a>
					<span>|</span>
					<a href="">YOHO!有货</a>
					<span>|</span>
					<a href="">新力传媒</a>
					<span>|</span>
					<a href="">联系我们</a>
					<span>|</span>
					<a href="">商家入驻</a>
					<span>|</span>
					<a href="">隐私条款</a>
					<span>|</span>
					<a href="">友情链接</a>
				</p>
				<p>CopyRight © 2007-2016 南京新与力文化传播有限公司 苏ICP备09011225号 NewPower Co. 版权所有 经营许可证编号：苏B2-20120395
</p>
			</div>
		</div>
		
	</div>
</div>	
<!---------------底部区域结束------------>




</body>
</html>
<!---------------商品信息区域结束 ----------->